package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.RoomDao;
import pojo.Room;
import service.RoomManager;

@Service
public class RoomManagerImpl implements RoomManager {

	@Autowired
	private RoomDao roomDao;
	
	@Transactional
	@Override
	public Room addInfo(Room info) {
		return roomDao.addInfo(info);
	}

	@Transactional
	@Override
	public void addInfoList(List<Room> infoList) {
		roomDao.addInfoList(infoList);

	}

	@Transactional
	@Override
	public Room getResult(Room param) {
		return roomDao.getResult(param);
	}

	@Transactional
	@Override
	public List<Room> getResults(String like) {
		
		return roomDao.getResults(like);
	}

	@Transactional
	@Override
	public boolean updateInfo(Room info) {
		
		return roomDao.updateInfo(info);
	}

	@Transactional
	@Override
	public boolean deleteInfo(Room info) {
		
		return roomDao.deleteInfo(info);
	}

}
